<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title></title>
  <script type="text/javascript" src="${path}/js/jquery-1.7.2.js"></script>
  <script type="text/javascript">
    function demo(param) {
      alert("参数:" + param);
    }

    $(function () {
      $(".123").click(function () {
//               console.log("按钮点击了...");
//                console.log(this);
//                console.log(this.id);
        console.log($(this).attr("my-data"));
      });
    });

  </script>
</head>
<body>
<h1>事件参数</h1>
<hr/>
<h2>js的写法</h2>
<button onclick="demo(123)">点击1</button>
<br/>
<button onclick="demo(456)">点击2</button>
<hr/>
<h2>jQuery的写法</h2>
<button my-data="78" class="myBtn" >点击3</button>
<br/>
<button my-data="90" class="myBtn" >点击4</button>
</body>
</html>
